var obj_ = {
	extend : function(o) {
		var extended = o.extended;
		for ( var i in o) {
			this[i] = o[i];
		}
		if (extended) {
			extended(this);
		}
	},
	isInstanceOf:function(o){
		if(this===o){
			return true;
		}
		if(this.__proto__.isInstanceOf){
			return this.__proto__.isInstanceOf(o);
		}
		return false;
	},
};

function createObj(o,name) {
	o = o || obj_;
	var r = Object.create(o);
	r.__parent__ = o;
	r.toString=function(){
		return name;
	};
	return r;
}